import { request } from '@ruifox-cms/utils'

// 获取用户列表
export function getCommonUserList(params) {
    return request({
        url: '/bidding/getCommonUserList',
        method: 'get',
        params
    })
}
// 获取菜单
export function getCommonMenu(params) {
    return request({
        url: '/bidding/getCommonMenu',
        method: 'get',
        params
    })
}

//获取供应商列表
export function getSupplierList(params) {
    return request({
        url: '/bidding/getSupplierList',
        method: 'get',
        params
    })
}
//获取供应商详情
export function getSupplierDetail(params) {
    return request({
        url: '/bidding/getSupplierDetail',
        method: 'get',
        params
    })
}
//审核供应商
export function auditSupplier(data) {
    return request({
        url: '/bidding/auditSupplier',
        method: 'post',
        data
    })
}
//获取供应商报名表
export function getVendorEnrollList(params) {
    return request({
        url: '/bidding/getVendorEnrollList',
        method: 'get',
        params
    })
}
//是否启用菜单
export function setMenuEnable(data) {
    return request({
        url: '/bidding/setMenuEnable',
        method: 'post',
        data
    })
}
// 获取工作台顶部统计（我的内容+审核）
export function stationStatistics(params) {
    return request({
        url: '/bidding/stationStatistics',
        method: 'get',
        params
    })
}
// 获取热门招标报表列表
export function hotBiddingReportList(params) {
    return request({
        url: '/bidding/hotBiddingReportList',
        method: 'get',
        params
    })
}
// 获取用户可快速发布的模型
export function getCanReleaseModel(params) {
    return request({
        url: '/bidding/canReleaseModel',
        method: 'get',
        params
    })
}
//概览近期发布
export function getRecentlyReleased(params) {
    return request({
        url: '/bidding/getRecentlyReleased',
        method: 'get',
        params
    })
}
// 删除草稿箱内容
export function draftDelete(data) {
    return request({
        url: '/bidding/draftDelete',
        method: 'delete',
        data
    })
}
// 撤稿
export function revokeArticle(data){
    return request({
        url: '/bidding/rejectArticle',
        method: 'post',
        data
    })
}
//获取角色列表(招标)
export function getRoleLists(params) {
    return request({
        url: '/bidding/roleList',
        method: 'get',
        params
    })
}
//获取默认权限
export function getRoleDefaultPermission() {
    return request({
        url: '/bidding/getDefaultPermission',
        method: 'get'
    })
}
//设置默认权限
export function setRoleDefaultPermission(data) {
    return request({
        url: '/bidding/setDefaultPermission',
        method: 'post',
        data
    })
}
//根据角色获取权限列表
export function getRolePermission(id) {
    return request({
        url: '/bidding/getRolePermission?id='+id,
        method: 'get'
    })
}
//设置角色权限
export function setRolePermission(data) {
    return request({
        url: '/bidding/setRolePermission',
        method: 'post',
        data
    })
}
//获取招标表单列表
export function getBiddingFormList(params) {
    return request({
        url: '/bidding/getBiddingFormList',
        method: 'get',
        params
    })
}
// 获取表单统计
export function getBiddingFormStatistics(params) {
  return request({
      url: '/bidding/getBiddingFormStatistics',
      method: 'get',
      params
  })
}
// 获取当前表单模板信息
export function getCurBiddingFormInfo(params) {
  return request({
      url: '/bidding/getCurBiddingFormInfo',
      method: 'get',
      params
  })
}
// 获取分析统计（表格形式）
export function getBiddingFormAnalysisData(params) {
  return request({
      url: '/bidding/getBiddingFormAnalysisData',
      method: 'get',
      params
  })
}
// 获取自定义来源
export function getBiddingCustomSource(params) {
  return request({
      url: '/formShare/getBiddingCustomSource',
      method: 'get',
      params
  })
}
// 清空数据
export function clearBiddingFormStatistics(data) {
  return request({
      url: '/formSystem/clearBiddingFormStatistics',
      method: 'delete',
      data
  })
}

//获取资质核验列表
export function getQualificationList(params) {
  return request({
      url: '/bidding/enterprise/selectPage',
      method: 'get',
      params
  })
}
//根据id获取资质核验详情
export function getQualificationById(params) {
  return request({
      url: '/bidding/enterprise/select',
      method: 'get',
      params
  })
}

// 资质核验-修改状态
export function qualificationEdit(data) {
  return request({
      url: '/bidding/enterprise/updateState',
      method: 'post',
      data
  })
}
// 资质核验-修改拉黑状态
export function qualificationBlack(data) {
  return request({
      url: '/bidding/enterprise/updateBlack',
      method: 'post',
      data
  })
}
// 资质证书-审核
export function certificateAudit(data) {
  return request({
      url: '/bidding/certificate/updateStateList',
      method: 'post',
      data
  })
}
// 根据id获取全部资质证件
export function getCertificateById(params) {
  return request({
      url: '/bidding/certificate/selectByEnterPriseId',
      method: 'get',
      params
  })
}
// 根据id获取全部资质证件（分页）
export function selectPageByEnterPriseld(params) {
  return request({
      url: '/bidding/certificate/selectPageByEnterPriseId',
      method: 'get',
      params
  })
}
//获取人员管理列表
export function getVendorList(params) {
  return request({
      url: '/bidding/getVendorList',
      method: 'get',
      params
  })
}
//根据id获取人员管理详情
export function getVendorById(params) {
  return request({
      url: '/bidding/getVendorById',
      method: 'get',
      params
  })
}
// 人员管理-修改状态
export function VendorEdit(data) {
  return request({
      url: '/bidding/VendorEdit',
      method: 'post',
      data
  })
}
// 项目管理-获取列表
export function biddingProjectList(params) {
  return request({
      url: '/bidding/project/selectPage',
      method: 'get',
      params
  })
}
// 项目管理-获取详情
export function biddingProjectById(params) {
  return request({
      url: '/bidding/project/select',
      method: 'get',
      params
  })
}
// 项目管理-新增
export function projectInsert(data) {
  return request({
      url: '/bidding/project/insert',
      method: 'post',
      data
  })
}
// 项目管理-修改
export function projectUpdate(data) {
  return request({
      url: '/bidding/project/update',
      method: 'post',
      data
  })
}
// 项目管理-修改状态
export function projectUpdateState(data) {
  return request({
      url: '/bidding/project/updateState',
      method: 'post',
      data
  })
}

// 项目管理-获取必选资质字典
export function getRequiredQualificationsOptions(params) {
  return request({
      url: '/bidding/getRequiredQualificationsOptions',
      method: 'get',
      params
  })
}
// 项目管理-获取可选资质字典
export function getOptionalQualificationsOptions(params) {
  return request({
      url: '/bidding/certificate/selectPrefixList',
      method: 'get',
      params
  })
}
// 项目管理-获取可选计划字典
export function getPlanOptions(params) {
  return request({
      url: '/bidding/plan/selectNameList',
      method: 'get',
      params
  })
}
// 项目管理-获取可绑定表单字典
export function getBindFormOptions(params) {
  return request({
      url: '/bidding/project/selectFormList',
      method: 'get',
      params
  })
}

// 计划管理-获取列表
export function biddingProcurementList(params) {
  return request({
      url: '/bidding/plan/selectPage',
      method: 'get',
      params
  })
}
// 计划管理-获取详情
export function biddingProcurementById(params) {
  return request({
      url: '/bidding/plan/select',
      method: 'get',
      params
  })
}
// 计划管理-保存 提交
export function insertPlan(data) {
  return request({
      url: '/bidding/plan/insert',
      method: 'post',
      data
  })
}
// 计划管理-修改
export function updatePlan(data) {
  return request({
      url: '/bidding/plan/update',
      method: 'post',
      data
  })
}
// 计划管理-修改计划状态（上级审核等）
export function updatePlanState(data) {
  return request({
      url: '/bidding/plan/updateState',
      method: 'post',
      data
  })
}
// 计划管理-修改基本信息
export function editProjectBaseInfo(data) {
  return request({
      url: '/bidding/editProjectBaseInfo',
      method: 'post',
      data
  })
}
// 计划管理-获取采购类型
export function procurementTypeOptions(params) {
  return request({
      url: '/bidding/procurementTypeOptions',
      method: 'get',
      params
  })
}
// 分页查询账号信息
export function userSelectPage(params) {
  return request({
      url: '/bidding/user/selectPage',
      method: 'get',
      params
  })
}
// 分页查询 根据企业id子账号信息
export function selectPageByEnterpriseId(params) {
  return request({
      url: '/bidding/user/selectPageByEnterpriseId',
      method: 'get',
      params
  })
}
// 修改账号状态
export function updateUserState(data) {
  return request({
      url: '/bidding/user/updateState',
      method: 'post',
      data
  })
}
// 查询子账号信息
export function userSelectInfo(params) {
  return request({
      url: '/bidding/user/selectInfo',
      method: 'get',
      params
  })
}
